//
//  CategoryCollectionViewCell.m
//  MountEverestFM
//
//  Created by ChenNing on 15/11/10.
//  Copyright © 2015年 chenn. All rights reserved.
//

#import "CategoryCollectionViewCell.h"

@interface CategoryCollectionViewCell()

@end

@implementation CategoryCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.contentView.backgroundColor = [UIColor whiteColor];
        self.titleLabel = [[UILabel alloc] init];
        self.titleLabel.font = [UIFont systemFontOfSize:13];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_titleLabel];
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.titleLabel.frame = self.contentView.bounds;
}

- (void)setCategoryModel:(CategoryModel *)categoryModel
{
    if (_categoryModel != categoryModel) {
        _categoryModel = categoryModel;
    }
     self.titleLabel.text = categoryModel.title;
    NSLog(@"%@",categoryModel.title);
}


@end
